package com.example.springboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springboot.domain.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {
    public List<Integer> queryRoleMenuIds(@Param("roleId") Integer roleId);

    public Integer addPermission(@Param("menuIds")List<Integer> menuIds,
                                 @Param("roleId") Integer roleId);

    public Integer removePermission(@Param("menuIds")List<Integer> menuIds,
                                    @Param("roleId") Integer roleId);
}
